-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't ICE when opaque types get their hidden type constrained again. #95471
Conversation
Contrary to popular belief, `codegen_fulfill_obligation` does not get used solely in codegen, so we cannot rely on `param_env` being set to RevealAll and thus revealing the hidden types instead of constraining them.
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
// Opaque types may have gotten their hidden types constrained, but we can ignore them safely | ||
// as they will get constrained elsewhere, too. | ||
let _opaque_types = infcx.inner.borrow_mut().opaque_type_storage.take_opaque_types(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"We can ignore them safely"
Do we have anything we could do to prevent a refactor from making that not true anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I can reveal them manually and check that the ones found here are equivalent
@bors r+ |
📌 Commit 1144677 has been approved by |
Don't ICE when opaque types get their hidden type constrained again. Contrary to popular belief, `codegen_fulfill_obligation` does not get used solely in codegen, so we cannot rely on `param_env` being set to RevealAll and thus revealing the hidden types instead of constraining them. Fixes rust-lang#89312 (for real this time)
Rollup of 5 pull requests Successful merges: - rust-lang#95130 (Stabilize thread::is_finished) - rust-lang#95263 (Restore `impl Future<Output = Type>` to async blocks) - rust-lang#95471 (Don't ICE when opaque types get their hidden type constrained again.) - rust-lang#95491 (Stabilize feature vec_retain_mut on Vec and VecDeque) - rust-lang#95497 (Spellchecking compiler comments) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…lang/rust#92007)"" This reverts commit c34cdca. 89312 is fixed by rust-lang/rust#95471 The rest by lazy TAIT take two rust-lang/rust#94081
…lang/rust#92007)"" This reverts commit c34cdca. 89312 is fixed by rust-lang/rust#95471 The rest by lazy TAIT take two rust-lang/rust#94081 Closes #1189 Closes #1190 Closes #1191 Closes #1192 Closes #1193 Closes #1194 Closes #1195 Closes #1196 Closes #1197 Closes #1198 Closes #1199 Closes #1200 Closes #1201
Contrary to popular belief,
codegen_fulfill_obligation
does not get used solely in codegen, so we cannot rely onparam_env
being set to RevealAll and thus revealing the hidden types instead of constraining them.Fixes #89312 (for real this time)